<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>欢迎光临</title>
	<link rel="stylesheet" type="text/css" href="/stylesheets/base.css">
	<link rel="stylesheet" type="text/css" href="/stylesheets/home.css">
	<link rel="stylesheet" type="text/css" href="/stylesheets/index.css">
	<style type="text/css" media="screen">
	

</style>
</head>
<body>
	<div id="all">
		<div id="top">
			<div id="topa">
				<ul>		
					<% for(var i =0 ;i<data.length;i++){%>
					<%if(data[i].a_name!=null){%>
                    <li id="a">欢迎*<a href="/gerenxinxi"><%=data[i].a_name%></a></li>
                    <li id="closeLogin"><a href="javascript:loginClose('<%=data[i].a_name%>')">退出登录</a></li>
                    <%break;%>
					<%}else if(i>3&&data[i].a_name==null){%>
					<li id="a"><a href="/login">亲！请登录</a></li>
					 <%break;%>
					<%}%>
					<%}%>
				</ul>
			</div>
			<div id="topb">
				<ul>
					<li ><a href="/hregist">后台管理</a></li>
					<li id="b"><a href=""><img src="/images/sm_r7_c23.jpg">联系客服</a></li>
				</ul>
			</div>
		</div>
		<div id="logo">
			<div id="img3"><img src="/images/touz.png" style="height: 100px  "></div>
			<div id="img2"><img src="/images/tou.png" style="height: 100px  "></div>

			<div id="img"><img src="/images/logo1.png" alt=""></div>
			<div id="ming">JOINFIT</div>
		</div>
		<div id="head">
			<ul>
				<li><a href="/">首页</a></li>
				<li ><a href="javascript:shopp_car()">购物车</a></li>
				<li ><a href="javascript:dingdan()">查看订单</a></li>
				<li ><a href="/huiyuan">会员修改</a></li>
				<li ><a href="/zhuce">注册有礼</a></li>
				<li ><a href="/liaotian">聊天室</a></li>
			</ul>
		</div>
		<div id="zhangshi">
			<div class="aui-content-max">
				<div class="aui-sale-time">
					<a href="javascript:;" class="aui-sale-time-link">
						<div class="aui-sale-title">限时秒杀</div>
						<div class="aui-sale-second">FLASH DEALS</div>
						<div class="aui-sale-icon-sd"></div>
						<div class="aui-sale-ends">本场距离结束还剩</div>
						<div class="aui-sale-count">
							<div class="aui-sale-count-item">
								<span id="hour_show">00时</span>
							</div>
							<div class="aui-sale-count-item">
								<span id="minute_show">00分</span>
							</div>
							<div class="aui-sale-count-item">
								<span id="second_show">00秒</span>
							</div>
						</div>
					</a>
				</div>
				<div class="aui-content-box">
					<div class="prev">
						<a href="javascript:void(0)">
							<img src="/images/prev.png" alt="">
						</a>
					</div>
					<div class="aui-content-box-ovf">
						<div class="aui-content-box-list">
							<ul>
								<li>
									<a href="#">
										<div class="aui-content-item-img">
											<img src="/images/qicai1.jpg" alt="">
										</div>
										<p class="aui-content-item-name">健身器材</p>
										<div class="aui-content-price">
											<span class="aui-content-price-new">
												<i>¥</i>
												<span>500.90</span>
											</span>
											<span class="aui-content-price-origin">
												<i>¥</i>
												<span>800.90</span>
											</span>
										</div>
									</a>
									<span><a href="javascript:addCar('qicai1.jpg',500.90,'健身器材')" class="aui-content-price-addcar" style="width:160px;position:absolute;margin-top:231px;margin-left:15px">加入购物车</a></span>

								</li>
								<li>
									<a href="#">
										<div class="aui-content-item-img">
											<img src="/images/qicai2.jpg" alt="">
										</div>
										<p class="aui-content-item-name">健身器材</p>
										<div class="aui-content-price">
											<span class="aui-content-price-new">
												<i>¥</i>
												<span>1899.90</span>
											</span>
											<span class="aui-content-price-origin">
												<i>¥</i>
												<span>2500.90</span>
											</span>
										</div>
									</a>
									<span><a href="javascript:addCar('qicai2.jpg',1899.90,'健身器材')" class="aui-content-price-addcar" style="width:160px;position:absolute;margin-top:231px;margin-left:15px">加入购物车</a></span>

								</li>
								<li>
									<a href="#">
										<div class="aui-content-item-img">
											<img src="/images/qicai3.jpg" alt="">
										</div>
										<p class="aui-content-item-name">健身器材</p>
										<div class="aui-content-price">
											<span class="aui-content-price-new">
												<i>¥</i>
												<span>2600.90</span>
											</span>
											<span class="aui-content-price-origin">
												<i>¥</i>
												<span>3000.90</span>
											</span>
										</div>
									</a>
									<span><a href="javascript:addCar('qicai3.jpg',2600.90,'健身器材')" class="aui-content-price-addcar" style="width:160px;position:absolute;margin-top:231px;margin-left:15px">加入购物车</a></span>
								</li>
								<li>
									<a href="#">
										<div class="aui-content-item-img">
											<img src="/images/qicai4.jpg" alt="">
										</div>
										<p class="aui-content-item-name">健身器材</p>
										<div class="aui-content-price">
											<span class="aui-content-price-new">
												<i>¥</i>
												<span>2200.90</span>
											</span>
											<span class="aui-content-price-origin">
												<i>¥</i>
												<span>2600.90</span>
											</span>
										</div>
									</a>
									<span><a href="javascript:addCar('qicai4.jpg',2200.90,'健身器材')" class="aui-content-price-addcar" style="width:160px;position:absolute;margin-top:231px;margin-left:15px">加入购物车</a></span>
								</li>
								<li>
									<a href="#">
										<div class="aui-content-item-img">
											<img src="/images/qicai5.jpg" alt="">
										</div>
										<p class="aui-content-item-name">健身器材</p>
										<div class="aui-content-price">
											<span class="aui-content-price-new">
												<i>¥</i>
												<span>500.90</span>
											</span>
											<span class="aui-content-price-origin">
												<i>¥</i>
												<span>800.90</span>
											</span>
										</div>
									</a>
									<span><a href="javascript:addCar('qicai5.jpg',500.90,'健身器材')" class="aui-content-price-addcar" style="width:160px;position:absolute;margin-top:231px;margin-left:15px">加入购物车</a></span>
								</li>
								<li>
									<a href="#">
										<div class="aui-content-item-img">
											<img src="/images/qicai6.jpg" alt="">
										</div>
										<p class="aui-content-item-name">健身器材</p>
										<div class="aui-content-price">
											<span class="aui-content-price-new">
												<i>¥</i>
												<span>1899.90</span>
											</span>
											<span class="aui-content-price-origin">
												<i>¥</i>
												<span>2200.90</span>
											</span>
										</div>
									</a>
									<span><a href="javascript:addCar('qicai6.jpg',1899.90,'健身器材')" class="aui-content-price-addcar" style="width:160px;position:absolute;margin-top:231px;margin-left:15px">加入购物车</a></span>
								</li>
								<li>
									<a href="#">
										<div class="aui-content-item-img">
											<img src="/images/qicai7.jpg" alt="">
										</div>
										<p class="aui-content-item-name">健身器材</p>
										<div class="aui-content-price">
											<span class="aui-content-price-new">
												<i>¥</i>
												<span>2600.90</span>
											</span>
											<span class="aui-content-price-origin">
												<i>¥</i>
												<span>3000.90</span>
											</span>
										</div>
									</a>
									<span><a href="javascript:addCar('qicai7.jpg',2600.90,'健身器材')" class="aui-content-price-addcar" style="width:160px;position:absolute;margin-top:231px;margin-left:15px">加入购物车</a></span>
								</li>
								<li>
									<a href="#">
										<div class="aui-content-item-img">
											<img src="/images/qicai8.jpg" alt="">
										</div>
										<p class="aui-content-item-name">健身器材</p>
										<div class="aui-content-price">
											<span class="aui-content-price-new">
												<i>¥</i>
												<span>2200.90</span>
											</span>
											<span class="aui-content-price-origin">
												<i>¥</i>
												<span>2600.90</span>
											</span>
										</div>
									</a>
									<span><a href="javascript:addCar('qicai8.jpg',2200.90,'健身器材')" class="aui-content-price-addcar" style="width:160px;position:absolute;margin-top:231px;margin-left:15px">加入购物车</a></span>
								</li>

							</ul>
						</div>
					</div>
					<div class="next">
						<a href="javascript:void(0)">
							<img src="/images/next.png" alt="">
						</a>
					</div>
				</div>
				<div class="aui-small-ad">
					<div class="example2">
						<ul>
							<li>
								<img src="/images/ad2.jpg" alt="2">
							</li>
							<li>
								<img src="/images/ad1.jpg" alt="1">
							</li>
							<li>
								<img src="/images/ad3.jpg" alt="3">
							</li>
						</ul>
						<ol>
							<li></li>
							<li></li>
							<li></li>
						</ol>
					</div>
				</div>
			</div>
		</div>
		<div id="shoppFenLei">
			<span id="shopp_FenLei">价格分类</span>
			<ul>						
				<li><a href="/yidaoer">500以下</a></li>
				<li><a href="/wubaidaoyiqian">500元-1000元</a></li>
				<li><a href="/YQYS">1000元以上</a></li>
				
			</ul>
		</div>
		<div id="middle">
			<div id="left">
				<div id="left_neirong">
					<div id="left_size">
						<img src="/images/gonggaotu.jpg" alt="" id="left_size_gonggaotu">
						<span id="left_size_gonggao">商城公告</span>
						<img src="/images/gg.jpg" id="gg">
					</div>
					<table id="gonggao" >
						<% for(var i =0 ;i<data.length;i++){%>
						<%if(data[i].f_name==null){%>
			            <%continue%>
			            <%}%>
						<tr>
							<td><%=data[i].f_name%></td>
						</tr>
						<%} %>
					</table>
				</div>
			</div>
			<div id="right">
				<table>
					<tr>
						<%var b=0;%>
						<%var c=0%>
			<% for(var i =0;i<data.length;i++){%>
			<%if(data[i].e_shopp==null){%>
			<%continue%>
			<%}%>
		     <%b=b+1;%>
		     <%if(b<=5){%>
						<td></li>
							<li class="rightli" style="">
								<a href="/xianqing?id=<%=data[i].e_id%>%>">
									<div class="">
										<img src="/images/<%=data[i].e_shoppTu%>" alt="" class="rightimg" style="width:160px;height:196px">
									</div>
									<p class="right-content-item-name"><%=data[i].e_shopp%></p>
									<div class="right-content-price">
										<span class="aui-content-price-new">
											<i>¥</i>
											<span><%=data[i].e_price%></span>
										</span>
										<span class="aui-content-price-origin">
											<i>¥</i>
											<span>2000.66</span>
										</span>
									</div>
								</a>
								<span><a href="javascript:addCar('<%=data[i].e_shoppTu%>',<%=data[i].e_price%>,'<%=data[i].e_shopp%>')" class="aui-content-price-addcar" style="width:160px;position:absolute;margin-top:60px">加入购物车</a></span>
							</li></td>
				<%}%>
				<%c=i%>
              <%} %>
									</tr>
									<tr>
					<% for(var i =c;i<data.length;i++){%>
			<%if(data[i].e_shopp==null){%>
			<%continue%>
			<%}%>
		     <%b=b+1;%>
		     <%if(b>5){%>
										<td></li>
											<li class="rightli" style="">
												<a href="/xianqing?id=<%=data[i].e_id%>%>">
													<div class="">
														<img src="/images/<%=data[i].e_shoppTu%>" alt="" class="rightimg" style="width:160px;height:196px;margin-top:90px">
													</div>
													<p class="right-content-item-name" style="margin-top:275px"><%=data[i].e_shopp%></p>
													<div class="right-content-price" style="margin-top:273px">
														<span class="aui-content-price-new" >
															<i>¥</i>
															<span><%=data[i].e_price%></span>
														</span>
														<span class="aui-content-price-origin">
															<i>¥</i>
															<span>500.66</span>
														</span>
													</div>
												</a>
												<span><a href="javascript:addCar('<%=data[i].e_shoppTu%>',<%=data[i].e_price%>,'<%=data[i].e_shopp%>')" class="aui-content-price-addcar" style="width:160px;position:absolute;margin-top:46px">加入购物车</a></span>
											</li></td>													
						<%}%>
              <%} %>	
										</tr> 
									</table>

								</div>
							</div>
							<div id="foot"></div>
						</div>
					</body>
					<script type="text/javascript" src="/javascripts/jquery.min.js"></script>
					<script type="text/javascript" src="/javascripts/banner.js"></script>
					<script type="text/javascript" src="/javascripts/ad.js"></script>
					<script type="text/javascript">


	//商品滚动
	$(function(){

		$(".next a").click(function(){ nextscroll() });

		function nextscroll(){

			var vcon = $(".aui-content-box-list ");

			var offset = ($(".aui-content-box-list li").width())*-1;

			vcon.stop().animate({left:offset},"slow",function(){

				var firstItem = $(".aui-content-box-list ul li").first();

				vcon.find("ul").append(firstItem);

				$(this).css("left","0px");

				circle()

			});

		};

		function circle(){

			var currentItem = $(".aui-content-box-list ul li").first();

			var currentIndex = currentItem.attr("index");

			$(".circle li").removeClass("circle-cur");

			$(".circle li").eq(currentIndex).addClass("circle-cur");

		}


		$(".prev a").click(function(){

			var vcon = $(".aui-content-box-list ");

			var offset = ($(".aui-content-box-list li").width()*-1);

			var lastItem = $(".aui-content-box-list ul li").last();

			vcon.find("ul").prepend(lastItem);

			vcon.css("left",offset);

			vcon.animate({left:"0px"},"slow",function(){

				circle()

			})

		});

});
	var intDiff = parseInt(600000);//倒计时总秒数量

	function timer(intDiff){
		window.setInterval(function(){

			var day=0,

			hour=0,

			minute=0,
				second=0;//时间默认值

				if(intDiff > 0){

					day = Math.floor(intDiff / (60 * 60 * 24));

					hour = Math.floor(intDiff / (60 * 60)) - (day * 24);

					minute = Math.floor(intDiff / 60) - (day * 24 * 60) - (hour * 60);

					second = Math.floor(intDiff) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);

				}

				if (minute <= 9) minute = '0' + minute;

				if (second <= 9) second = '0' + second;


				$('#hour_show').html('<s id="h"></s>'+hour+'时');

				$('#minute_show').html('<s></s>'+minute+'分');

				$('#second_show').html('<s></s>'+second+'秒');

				intDiff--;

			}, 1000);

	}


	$(function(){

		timer(intDiff);

	});

	//ad自动滚动
	$(function(){
		$(".example2").luara({width:"194",height:"275",interval:3500,selected:"seleted",deriction:"left"});

	});

	function addCar(shoppTu,price,shopp) {  //添加购物车先判断
		if (document.getElementById('closeLogin')!=null) {  //如果有退出登录的 表示用户已经登录
		var str=`/shopp_addcar_handler?shoppTu=${shoppTu}&price=${price}&shopp=${shopp}`;
		location.href=str;
		}
	}
    
    function shopp_car(){   //跳转购物车需先判断
    	if (document.getElementById('closeLogin')!=null) {  //如果有退出登录的 表示用户已经登录 
    		var str=`/shopp_car`;
    		location.href=str;
    	}
    }


     function dingdan(){   //跳订单界面需先判断
    	if (document.getElementById('closeLogin')!=null) {  //如果有退出登录的 表示用户已经登录 
    		var str=`/dingdan`;
    		location.href=str;
    	}
    }

    function loginClose(t){
    	var str=`/login_close_handler?name=${t}`;
    	location.href=str;
    }
</script>
</html>